package com.abing.starry.service;

import com.abing.starry.model.entity.QuestionEntity;
import com.abing.starry.model.entity.QuestionSubmitEntity;
import com.abing.starry.model.request.question.QuestionPageRequest;
import com.abing.starry.model.request.question.QuestionSubmitRequest;
import com.abing.starry.model.vo.question.QuestionEntityVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author 阿炳亿点点帅
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2024-09-05 17:27:12
*/
public interface QuestionService extends IService<QuestionEntity> {

    /**
     * 分页查询题目列表 针对管理员
     * @param questionPageRequest
     * @return
     */
    IPage<QuestionEntity> listQuestionByPage(QuestionPageRequest questionPageRequest);

    /**
     * 题目首页 针对用户
     * @param questionPageRequest
     * @return
     */
    IPage<QuestionEntityVO> listQuestionForUserByPage(QuestionPageRequest questionPageRequest);

    /**
     * 判题
     * @param questionSubmitRequest
     * @return
     */
    QuestionSubmitEntity doQuestionSubmit(QuestionSubmitRequest questionSubmitRequest);

}
